package com.tianya.portal.blog.service.impl;

import com.tianya.portal.blog.domain.BlogNoteTopic;
import com.tianya.portal.blog.mapper.BlogNoteTopicMapper;
import com.tianya.portal.blog.service.IBlogNoteTopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 笔记专题Service业务层处理
 * 
 * @author tianya
 * @date 2023-05-01
 */
@Service
public class BlogNoteTopicServiceImpl implements IBlogNoteTopicService 
{
    @Autowired
    private BlogNoteTopicMapper blogNoteTopicMapper;

    /**
     * 查询笔记专题
     * 
     * @param id 笔记专题主键
     * @return 笔记专题
     */
    @Override
    public BlogNoteTopic selectBlogNoteTopicById(Long id)
    {
        return blogNoteTopicMapper.selectBlogNoteTopicById(id);
    }

    /**
     * 查询笔记专题列表
     * 
     * @param blogNoteTopic 笔记专题
     * @return 笔记专题
     */
    @Override
    public List<BlogNoteTopic> selectBlogNoteTopicList(BlogNoteTopic blogNoteTopic)
    {
        return blogNoteTopicMapper.selectBlogNoteTopicList(blogNoteTopic);
    }

    /**
     * 新增笔记专题
     * 
     * @param blogNoteTopic 笔记专题
     * @return 结果
     */
    @Override
    public int insertBlogNoteTopic(BlogNoteTopic blogNoteTopic)
    {
        return blogNoteTopicMapper.insertBlogNoteTopic(blogNoteTopic);
    }

    /**
     * 修改笔记专题
     * 
     * @param blogNoteTopic 笔记专题
     * @return 结果
     */
    @Override
    public int updateBlogNoteTopic(BlogNoteTopic blogNoteTopic)
    {
        return blogNoteTopicMapper.updateBlogNoteTopic(blogNoteTopic);
    }

    /**
     * 批量删除笔记专题
     * 
     * @param ids 需要删除的笔记专题主键
     * @return 结果
     */
    @Override
    public int deleteBlogNoteTopicByIds(Long[] ids)
    {
        return blogNoteTopicMapper.deleteBlogNoteTopicByIds(ids);
    }

    /**
     * 删除笔记专题信息
     * 
     * @param id 笔记专题主键
     * @return 结果
     */
    @Override
    public int deleteBlogNoteTopicById(Long id)
    {
        return blogNoteTopicMapper.deleteBlogNoteTopicById(id);
    }
}
